home *** CD-ROM | disk | FTP | other *** search
-
- #include <stdio.h>
-
- char s[40000];
-
- int strlen(const char s[])
- {
- int i = 0;
-
- while (s[i] != '\0')
- ++i;
- #ifdef DEBUG
- printf("%d\n", i);
- #endif
- return i;
- }
-
- int main(void)
- {
- unsigned i;
-
- for (i = 0; i < 40000; ++i)
- s[i] = 'x';
- s[38000] = '\0';
- printf("%u\n", strlen(s));
- return 0;
- }
-
-
-
-
-